<template>
	<view class="home">
		<view class="banner">
			<u-swiper :list="bannerList" @change="changeBanner" @click="clickBanner" indicator indicatorMode="line"
				circular></u-swiper>
		</view>
		<u-notice-bar icon="volume-fill" :text="message" bgColor="#FFF" color="#999999" mode="link"
			url="/pages/home/home"></u-notice-bar>
		<view class="body">
			<home-cell title="设备查询" :menu="menu1"></home-cell>
			<home-cell title="设备业务" :menu="menu2"></home-cell>
			<home-cell title="实验室查询" :menu="menu3"></home-cell>
			<home-cell title="实验室业务" :menu="menu4"></home-cell>
		</view>
	</view>
</template>

<script>
	import HomeCell from '@/components/HomeCell/HomeCell.vue'
	export default {
		components: {
			HomeCell,
		},
		data() {
			return {
				wh: 0,
				bannerList: [
					'https://cdn.uviewui.com/uview/swiper/swiper1.png',
					'https://cdn.uviewui.com/uview/swiper/swiper2.png',
					'https://cdn.uviewui.com/uview/swiper/swiper3.png',
				],
				message: '欢迎加入智慧实验室',
				menu1: [{
						name: '设备监视',
						src: '/static/home-icons/sbjs.png',
						url: '/subpkg/device-list/device-list'
					},
					{
						name: '使用查询',
						src: '/static/home-icons/sycx.png',
						url: ''
					},
					{
						name: '在借查询',
						src: '/static/home-icons/zjcx.png',
						url: ''
					},
					{
						name: '我的在借',
						src: '/static/home-icons/zdzj.png',
						url: ''
					},
					{
						name: '我的订阅',
						src: '/static/home-icons/wddy.png',
						url: ''
					},
				],
				menu2: [{
						name: '我的预约',
						src: '/static/home-icons/wdyy-1.png',
						url: '/subpkg/device-my-check/device-my-check'
					},
					{
						name: '预约清单',
						src: '/static/home-icons/yyqd-1.png',
						url: ''
					},
					{
						name: '预约申请',
						src: '/static/home-icons/yysq-1.png',
						url: '/subpkg/device-booking/device-booking'
					},
					{
						name: '扫码借设备',
						src: '/static/home-icons/smjsb.png',
						url: ''
					},
					{
						name: '扫码还设备',
						src: '/static/home-icons/smhsb.png',
						url: ''
					},
					{
						name: '预约管理',
						src: '/static/home-icons/yygl-1.png',
						url: ''
					},
					{
						name: '我审批的',
						src: '/static/home-icons/wspd-1.png',
						url: ''
					},
					{
						name: '我的待办',
						src: '/static/home-icons/wddb-1.png',
						url: '/subpkg/device-my-todo/device-my-todo'
					},
					{
						name: '借出确认',
						src: '/static/home-icons/jcqr.png',
						url: ''
					},
					{
						name: '归还确认',
						src: '/static/home-icons/ghqr.png',
						url: ''
					}
				],
				menu3: [{
						name: '实验室监视',
						src: '/static/home-icons/sysjs.png',
						url: ''
					},
					{
						name: '我的记录',
						src: '/static/home-icons/wdjl.png',
						url: ''
					},
					{
						name: '预约清单',
						src: '/static/home-icons/yyqd-2.png',
						url: ''
					},
					{
						name: '记录查询',
						src: '/static/home-icons/jlcx.png',
						url: ''
					},
					{
						name: '实验室巡检',
						src: '/static/home-icons/sysxj.png',
						url: ''
					},
					{
						name: '巡检管理',
						src: '/static/home-icons/xjgl.png',
						url: ''
					}
				],
				menu4: [{
						name: '预约申请',
						src: '/static/home-icons/yysq-2.png',
						url: '/subpkg/labBusiness/labBooking/labBooking'
					},
					{
						name: '我的预约',
						src: '/static/home-icons/wdyy-2.png',
						url: '/subpkg/labBusiness/my-lab-booking/my-lab-booking'
					},
					{
						name: '我的待办',
						src: '/static/home-icons/wddb-2.png',
						url: ''
					},
					{
						name: '我审批的',
						src: '/static/home-icons/wspd-2.png',
						url: ''
					},
					{
						name: '预约管理',
						src: '/static/home-icons/yygl-2.png',
						url: ''
					}
				],
			};
		},
		onLoad() {
			// uni.navigateTo({
			// 	url: '/pages/login/login'
			// })
			const sysInfo = uni.getSystemInfoSync()
			this.wh = sysInfo.windowHeight
		},
		methods: {
			changeBanner() {

			},
			clickBanner() {

			}
		}
	}
</script>

<style lang="scss">
	.home {
		background-color: #F6F6F6;
		min-height: 100vh;
		padding-bottom: 32rpx;

		.banner {
			padding: 32rpx 32rpx 0;

			.u-swiper {
				height: 260rpx;
			}
		}

		.u-notice-bar {
			margin-top: 18rpx;
			margin-bottom: 32rpx;
		}

		.body {
			padding: 0 32rpx;

			.home-cell {
				margin-bottom: 32rpx;
			}
		}
	}
</style>
